Create Shipment from Quote

Create Shipment from Quote

POST/v1/open-api/label
LabelRequiredDescription
Api-KeyApi Key, please log in to the system and find it in My Profile
Api-SecretApi Secret, please log in to the system and find it in My Profile

Entity Types

The address recognition API is currently designed to recognize the following types of entities:

ParameterTypeRequiredDescription
rate_id[string]Service unique id.
custom_order_num[string]
shipment[object]
﹂ship_from[object]-
﹂﹂uuid[array]Address unique id.If you want to improve the accuracy of the ship from address, you can choose to send only uuid.
Click to see how to get uuid.
Example:22d953b7-24c4-4ae9-afb4-111cc227b01e
﹂﹂postal_code[string]Format [xxxxx] or [xxxxx-xxxx]
Example:90045-6275
﹂﹂country_code[string]This is the two-letter country code.
Example:US
﹂﹂state_province_code[string]This is the two-letter state code.
Example:CA
﹂﹂is_residential[boolean]Indicate whether this address is residential (as opposed to commercial).
Example:false
﹂﹂addresses[array]This is the combination of number, street name, etc. Maximum length per line is 35.Note:At least one line is required.
Example:6925 Riverview Ave
﹂﹂city[string]City Name.
Example:Kansas City
﹂﹂name[string]Specify the shipper name.Maximum length is 35 characters.
Example:Amazon
﹂﹂phone[string]Specify the shipper phone number. At least 10 digits.
Example:1000000000
﹂﹂attention[string]Note.Maximum length is 35 characters.
Example:Ann
﹂ship_to[object]-
﹂﹂addresses[array]This is the combination of number, street name, etc. Maximum length per line is 35.Note:At least one line is required.
Example:6925 Riverview Ave
﹂﹂city[string]City Name.
Example: PENFIELD
﹂﹂state_province_code[string]This is the two-letter state code.
Example:NY
﹂﹂postal_code[string]Format :[xxxxx] or [xxxxx-xxxx]
Example:14526
﹂﹂country_code[string]This is the two-letter country code.
Example:US
﹂﹂name[string]Specify the recipient name.Maximum length is 35 characters.
Example:Ann
﹂﹂phone[string]Specify the recipient phone number. At least 10 digits.
Example:(999)-999-9999
﹂﹂phone_ext[string]Maximum length is 4 characters.
Example:1234
﹂﹂is_residential[boolean]Indicate whether this address is residential (as opposed to commercial)
Example:false
﹂﹂attention[string]Note.Maximum length is 35 characters.
Example:Ann
﹂packages[array]
﹂﹂dimension[object]Indicate the dimensions of the package.
Note: The maximum/minimum dimension values varies based on the services and the packaging types.
﹂﹂﹂width[number]Indicate the width of the package.
This value allows 2 explicit decimal position.
Example:20.01
﹂﹂﹂height[number]Indicate the height of the package.
This value allows 2 explicit decimal position.
Example:20.01
﹂﹂﹂length[number]Indicate the length of the package.
This value allows 2 explicit decimal position.
Example:20.01
﹂﹂﹂code[string]Indicate the Unit of measure for the provided dimensions.
Valid Values are:in/cm
Example:in
﹂﹂weight[object]Indicate the weight of the package.
﹂﹂﹂code[string]This is the package weight unit.
Valid Values are:lb/oz/g/kg
Example:lb
﹂﹂﹂value[number]This value allows 2 explicit decimal position.
Example:68.25
﹂﹂insurance[object]Indicate the insurance
﹂﹂﹂code[string]This is the currency code for the amount.
Example:USD
﹂﹂﹂value[number]This value allows 2 explicit decimal position.
Example:300.01
﹂﹂confirmation[string]Indicate the Signature Type.Click here to see the confirmation supported by the service provider.
Example:None
﹂﹂quantity[number]Package quantity
Example:1
﹂﹂reference_numbers[array]Reference information
﹂﹂﹂code[string]This is a customer reference type. Click here to see the reference type supported by the service provider.
Example:INVOICE
﹂﹂﹂value[object]Maximum length for all customer references is 40 characters.
Example:P84746-KMD
﹂package_type[object]Specify the packaging used.Click here to see Package Types.
﹂﹂type[string]Example:common
﹂﹂name[string]Example:Package
﹂label_specification[object]Label specification
﹂﹂label_format[string]Example:pdf 。option:zpl , pdf
﹂pickup_date[string]This is the shipment date. Format :[yyyymmdd]
Example:20221001
curl -X POST  \
  'https://api.sandbox.shipber.com/v1/open-api/label' \
  -H 'Content-Type:application/json' \
  -H 'Api-Key:2cn1wgmfidytin3jef3b' \
  -H 'Api-Secret:qRBYybjRch7BdTxO5NTyGUd6mBvowNbsjahnAnpdI-BXc5sCrRt15XGr-hc9oY7C' \
  -d '{
    "rate_id": "eyJzZXJ2aWNlQ29kZSI6InVwc19ncm91bmQiLCJjaGFpbklkIjoyMDAzLCJwYWNrYWdlVHlwZSI6IlBhY2thZ2UifQ==",
    "custom_order_num": "cimy-977885",
    "shipment": {
        "ship_from": {
            "uuid": "7b572b8d-08a3-4cc7-a711-1aae28e9ffcf"
        },
        "ship_to": {
            "city": "Kansas City",
            "name": "Test Company",
            "addresses": [
                "6925 Riverview Ave"
            ],
            "postal_code": "66102",
            "country_code": "US",
            "state_province_code": "KS",
            "phone": "0123456789"
        },
        "packages": [
            {
                "dimension": {
                    "width": 7,
                    "height": 13,
                    "length": 4,
                    "code": "IN"
                },
                "weight": {
                    "code": "lb",
                    "value": 6
                },
                "confirmation": "None",
                "quantity": 1,
                "reference_numbers": [
                    {
                        "code": "reference #1",
                        "value": "1"
                    }
                ]
            }
        ],
        "package_type": {
            "type": "common",
            "name": "Package"
        },
        "label_specification": {
            "label_format": "pdf"
        },
        "pickup_date": "20211010"
    }
}'
{
    "data": {
        "status": "Printing",
        "order_num": "ST161853120081597000",
        "shipment": {
            "ship_from": {
                "city": "Kansas City",
                "name": "Test Company",
                "email": "[email protected]",
                "addresses": ["6925 Riverview Ave"],
                "postal_code": "66102",
                "country_code": "US",
                "is_residential": true,
                "state_province_code": "KS",
                "attention": "",
                "phone": "0123456789"
            },
            "ship_to": {
                "country_code": "US",
                "phone": "8888888888",
                "name": "Test Company",
                "addresses": ["6925 Riverview Ave"],
                "city": "Kansas City",
                "state_province_code": "KS",
                "postal_code": "66102"
            },
            "packages": [{
                "dimension": {
                    "width": 7,
                    "height": 13,
                    "length": 4,
                    "code": "IN"
                },
                "weight": {
                    "code": "LBS",
                    "value": 6
                },
                "confirmation": "Delivery",
                "insurance": {
                    "code": "USD",
                    "value": 20
                },
                "quantity": 1
            }],
            "package_type": {
                "type": "common",
                "name": "Package"
            },
            "label_specification": {
                "label_format": "pdf"
            },
            "pickup_date": "20210416",
            "service_code": "fedex_ground"
        },
        "created_at": "2021-04-16T04:30:28.632Z",
        "custom_order_num": "cimy-15913"
    }
}

Create Return Label with Outgoing Label

You can create return labels by setting is_return_label to true.

curl -X POST  \
  'https://api.sandbox.shipber.com/v1/open-api/label' \
  -H 'Content-Type:application/json' \
  -H 'Api-Key:2cn1wgmfidytin3jef3b' \
  -H 'Api-Secret:qRBYybjRch7BdTxO5NTyGUd6mBvowNbsjahnAnpdI-BXc5sCrRt15XGr-hc9oY7C' \
  -d '{
    "is_return_label":true,
    "rma_number": "123",
    "rma_reason": "Other",
    "rate_id": "eyJjaGFpbklkIjo0MTksInNlcnZpY2VDb2RlIjoiZmVkZXhfZ3JvdW5kIiwicGFja2FnZVR5cGUiOiJQYWNrYWdlIn0",
    "custom_order_num": "cimy-977885",
    "shipment": {
        "ship_from": {
            "city": "Kansas City",
            "name": "Test Company",
            "addresses": [
                "6925 Riverview Ave"
            ],
            "postal_code": "90045",
            "country_code": "US",
            "state_province_code": "KS",
            "phone": "0123456789"
        },
        "ship_to": {
            "uuid": "7b572b8d-08a3-4cc7-a711-1aae28e9ffcf"
        },
        "packages": [
            {
                "dimension": {
                    "width": 7,
                    "height": 13,
                    "length": 4,
                    "code": "IN"
                },
                "weight": {
                    "code": "lb",
                    "value": 6
                },
                "confirmation": "None",
                "quantity": 1,
                "reference_numbers": [
                    {
                        "code": "reference #1",
                        "value": "1"
                    }
                ]
            }
        ],
        "package_type": {
            "type": "common",
            "name": "Package"
        },
        "label_specification": {
            "label_format": "pdf"
        },
        "pickup_date": "20211010"
    }
}'
{
    "data": {
        "status": "Printing",
        "order_num": "ST161853120081597000",
        "shipment": {
            "ship_from": {
                "country_code": "US",
                "phone": "8888888888",
                "name": "Test Company",
                "addresses": ["6925 Riverview Ave"],
                "city": "Kansas City",
                "state_province_code": "KS",
                "postal_code": "66102",
                "attention": ""
            },
            "ship_to": {
                "city": "Kansas City",
                "name": "Test Company",
                "email": "[email protected]",
                "addresses": ["6925 Riverview Ave"],
                "postal_code": "90045",
                "country_code": "US",
                "is_residential": true,
                "state_province_code": "KS",
                "attention": "",
                "phone": "0123456789"
            },
            "packages": [{
                "dimension": {
                    "width": 7,
                    "height": 13,
                    "length": 4,
                    "code": "IN"
                },
                "weight": {
                    "code": "LBS",
                    "value": 6
                },
                "confirmation": "Delivery",
                "insurance": {
                    "code": "USD",
                    "value": 20
                },
                "quantity": 1
            }],
            "package_type": {
                "type": "common",
                "name": "Package"
            },
            "pickup_date": "20210416",
            "service_code": "fedex_ground"
        },
        "created_at": "2021-04-16T04:30:28.632Z",
        "custom_order_num": "cimy-15913"
    }
}